#9*9乘法表
#for...in实现
a=[1,2,3,4,5,6,7,8,9]
b=[9,8,7,6,5,4,3,2,1]
i=1
j=1
for i in a:
    j=1
    for j in a[0:i]:
        print("{}*{}={}  ".format(j,i,i*j),end="")
    print()
print("="*70)

i=1
j=1
k=1
for i in a:
    j=10-i;
    for k in a[0:j]:
        print("{}*{}={}  ".format(k,j,k*j),end="")
    print()
    i+=1
print("="*70)



i=1
j=9
for i in a:
    j=9
    for j in b:
        if j>i:
            print("        ",end="")
        else:
            print("{}*{}={}  ".format(j,i,i*j),end="")           
        j-=1
    print()
    i+=1
print("="*70)

i=9
j=9
for i in b:
    j=9
    for j in b:
        if j>i:
            print("        ",end="")
        else:
            print("{}*{}={}  ".format(j,i,i*j),end="")           
        j-=1
    print()
    i-=1

